package day4

import scala.collection.mutable.ArrayBuffer

object Test3 {
  def main(args: Array[String]): Unit = {
    val arr =new ArrayBuffer[(String, Int, Double)]()
    arr.append(("余生",22,99.9))
    arr.append(("阿生",22,89.9))
    arr.append(("紫霞",22,79.9))
    arr.append(("青霞",22,109.9))

    val arr2 = arr.map ( (v:(String, Int, Double) ) => {
      var resule = ""
      if (v._3 > 90){
        resule = "优"
      }else {
        resule = "差"
      }
      (v._1,v._2,resule)
    })

    for (elem <- arr2) {
      println(elem)
    }

  }
}
